[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
ALLTRIM() Returns runtime error if embedded in a macro.
Clipper Version 1.03 dtd 09/15/90.
Problem Statement
When ALLTRIM(cVar) is included in a macro statement, a runtime
error occurs when the macro is expanded.
Cause
ALLTRIM(cVar) is a psuedo-function, created by directive in STD.CH; i.e.,
#translate Alltrim(<c>) => Ltrim(Trim( <c> ))
Work Around(s)
1) Create a real function, ALLTRIM(cVar), in your .PRG; e.g.,
FUNCTION ALLTRIM
PARAMETERS cVar
RETURN LTRIM(TRIM(cVar))
2) Create the above function and compile using the /N option.
Include the resultant .OBJ file when linking.
Note: You may delete the #translate line from MYNAME.CH.
3) Create the above function and compile using the /N option.
Add the resultant .OBJ file to a .LIB file; e.g., EXTEND.LIB.
Note: You may delete the #translate line from MYNAME.CH.
4) Replace all ALLTRIM(cVar) references in your .PRG with
LTRIM(TRIM(cVar)).
Note
See Support Bulletin 4 in the NANFORUM Library.
See Also:
RIGHT()
STD.CH
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson